import request from '@/utils/request'

// 查询药品收货地址列表
export function listAddress(query) {
  return request({
    url: '/medicine/address/list',
    method: 'get',
    params: query
  })
}

// 查询药品收货地址详细
export function getAddress(id) {
  return request({
    url: '/medicine/address/addressDetail',
    method: 'get',
    params: {
      id
    }
  })
}

// 新增药品收货地址
export function addAddress(data) {
  return request({
    url: '/medicine/address/add',
    method: 'post',
    data: data
  })
}

// 修改药品收货地址
export function updateAddress(data) {
  return request({
    url: '/medicine/address/upload',
    method: 'post',
    data: data
  })
}

// 删除药品收货地址
export function delAddress(ids) {
  return request({
    url: '/medicine/address/batchDelete',
    method: 'post',
    params: {
      ids
    }
  })
}
